package com.cloudsigns.factorymanager2.produce.bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class ProduceProduceOrderBean extends ProduceOrderParentBean implements Serializable {
    /*整个订单完成时间*/
    private long completeDate;
    /*创建人，只有创建人才可以对自己创建的生产工单进行编辑，删除，派发，其它人不可见*/
    private String createOrderAccountId;
    /*创建人名称*/
    private String createOrderAccountName;
    /*产品*/
    private List<Produce_ProductBean> productList=new ArrayList<>();
    /*接收人ID*/
    private String receiveAccountId;
    /*接收人名称*/
    private String receiveAccountName;

    /*接收工单时间*/
    private long receiveOrderTime;

    private String unit;
    private ShapeTypeBean shapeTypeBean=new ShapeTypeBean();


    public long getCompleteDate() {
        return completeDate;
    }

    public void setCompleteDate(long completeDate) {
        this.completeDate = completeDate;
    }

    public String getCreateOrderAccountId() {
        return createOrderAccountId;
    }

    public void setCreateOrderAccountId(String createOrderAccountId) {
        this.createOrderAccountId = createOrderAccountId;
    }

    public String getCreateOrderAccountName() {
        return createOrderAccountName;
    }

    public void setCreateOrderAccountName(String createOrderAccountName) {
        this.createOrderAccountName = createOrderAccountName;
    }

    public List<Produce_ProductBean> getProductList() {
        return productList;
    }

    public Produce_ProductBean getProductByPid(String pid){
          for ( Produce_ProductBean pb : productList){
              if(pid.equals(pb.getProductId())){
                  return  pb;
              }
          }
          return null;
    }
    public void setProductList(List<Produce_ProductBean> productList) {
        this.productList = productList;
    }

    public String getReceiveAccountId() {
        return receiveAccountId;
    }

    public void setReceiveAccountId(String receiveAccountId) {
        this.receiveAccountId = receiveAccountId;
    }

    public String getReceiveAccountName() {
        return receiveAccountName;
    }

    public void setReceiveAccountName(String receiveAccountName) {
        this.receiveAccountName = receiveAccountName;
    }

    public long getReceiveOrderTime() {
        return receiveOrderTime;
    }

    public void setReceiveOrderTime(long receiveOrderTime) {
        this.receiveOrderTime = receiveOrderTime;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public ShapeTypeBean getShapeTypeBean() {
        return shapeTypeBean;
    }

    public void setShapeTypeBean(ShapeTypeBean shapeTypeBean) {
        this.shapeTypeBean = shapeTypeBean;
    }
}
